<?php if (!defined('SHUIPF_VERSION')) exit(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><if condition=" isset($SEO['title']) && !empty($SEO['title']) ">{$SEO['title']}</if>{$SEO['site_title']}</title>
<meta name="description" content="{$SEO['description']}" />
<meta name="keywords" content="{$SEO['keyword']}" />
<link type="text/css" rel="stylesheet" href=".{$config_siteurl}statics/default/Style/base.css" />
</head>

<body>
	<!--  页面头部  -->
	<template file="Content/header.php"/>
	<!--  头部结束  -->
	<!--  内容区域  -->
    <div class="coner">
    	<!--  海报区域  --> 
    	<template file="Content/Banner.php"/>
 		<!--  海报结束  --> 
        <h1>PRODUCTS<b>{:getCategory($catid,'catname')}</b></h1>
        <div class="apply">
        	<a href="{:getCategory(7,'url')}"><span class="apply1 png_bg"></span></a>
            <a href="{:getCategory(8,'url')}"><span class="apply2 png_bg"></span></a>
            <a href="{:getCategory(9,'url')}"><span class="apply3 png_bg"></span></a>
            <a href="{:getCategory(10,'url')}"><span class="apply4 png_bg"></span></a>
            <a href="{:getCategory(11,'url')}"><span class="apply5 png_bg"></span></a>     
            <a href="{:getCategory(12,'url')}"><span class="apply6 png_bg"></span></a>
            <a href="{:getCategory(13,'url')}"><span class="apply7 png_bg"></span></a> 
        </div>
					<div class="product">
				<div class="serach">
					<form name="flpage" action="" id="search" name="search" url="{:U('Index/search')}" method="post">
						</span><input type="hidden" name="g" value="search" />
						<input type="hidden" name="catid" value="{$catid}" />
						<input class="key" name="q" id="q" value="产品搜索" type="text">
						<input class="sub" name="submit" id="submit" type="submit" value="">
					</form>
				</div> 
				<div class="product_list">
				<get sql="SELECT * FROM jbr_product where catid in (SELECT catid from jbr_category WHERE parentid=6)ORDER BY inputtime DESC" page="$page" page_currentclass="cpb" num="9">
				<volist name="data" id="vo">	
					<div class="item">
						<a href="{$vo.url}">
							<img src="{$vo.thumb}"/>
							<p>产品：<b>{$vo.title}</b></p>    
						</a>
					</div>
				</volist>
				</div>  
				<div class="asppage20">
					<div class="pager">{$pages}</div>
				</div>  
				</get> 
				</div>
    </div>
	<!--  内容结束  --> 
	<!--  页面尾部  --> 
    <template file="Content/footer.php"/>
	<!--  尾部结束  --> 
    <!--[if IE 6]>
    <script src="js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
    <script type="text/javascript">
    DD_belatedPNG.fix('.png_bg');
    </script>
    <![endif]-->
	<script type="text/javascript" src="Js/jquery.js"></script>
    <script type="text/javascript" src="Js/base.js"></script>   
	<script type="text/javascript">
    //*焦点切换
    (function(){
        if(!Function.prototype.bind){
            Function.prototype.bind = function(obj){
                var owner = this,args = Array.prototype.slice.call(arguments),callobj = Array.prototype.shift.call(args);
                return function(e){e=e||top.window.event||window.event;owner.apply(callobj,args.concat([e]));};
            };
        }
    })();
    var player = function(id){
        this.ctn = document.getElementById(id);
        this.adLis = null;
        this.btns = null;
        this.animStep = 0.2;//动画速度0.1～0.9
        this.switchSpeed = 3;//自动播放间隔(s)
        this.defOpacity = 1;
        this.tmpOpacity = 1;
        this.crtIndex = 0;
        this.crtLi = null;
        this.adLength = 0;
        this.timerAnim = null;
        this.timerSwitch = null;
        this.init();
    };
    player.prototype = {
        fnAnim:function(toIndex){
            if(this.timerAnim){window.clearTimeout(this.timerAnim);}
            if(this.tmpOpacity <= 0){
                this.crtLi.style.opacity = this.tmpOpacity = this.defOpacity;
                this.crtLi.style.filter = 'Alpha(Opacity=' + this.defOpacity*100 + ')';
                this.crtLi.style.zIndex = 0;
                this.crtIndex = toIndex;
                return;
            }
            this.crtLi.style.opacity = this.tmpOpacity = this.tmpOpacity - this.animStep;
            this.crtLi.style.filter = 'Alpha(Opacity=' + this.tmpOpacity*100 + ')';
            this.timerAnim = window.setTimeout(this.fnAnim.bind(this,toIndex),50);
        },
        fnNextIndex:function(){
            return (this.crtIndex >= this.adLength-1)?0:this.crtIndex+1;
        },
        fnSwitch:function(toIndex){
            if(this.crtIndex==toIndex){return;}
            this.crtLi = this.adLis[this.crtIndex];
            for(var i=0;i<this.adLength;i++){
                this.adLis[i].style.zIndex = 0;
            }
            this.crtLi.style.zIndex = 2;
            this.adLis[toIndex].style.zIndex = 1;
            for(var i=0;i<this.adLength;i++){
                this.btns[i].className = '';
            }
            this.btns[toIndex].className = 'on'
            this.fnAnim(toIndex);
        },
        fnAutoPlay:function(){
            this.fnSwitch(this.fnNextIndex());
        },
        fnPlay:function(){
            this.timerSwitch = window.setInterval(this.fnAutoPlay.bind(this),this.switchSpeed*1000);
        },
        fnStopPlay:function(){
            window.clearTimeout(this.timerSwitch);
        },
        init:function(){
            this.adLis = this.ctn.getElementsByTagName('li');
            this.btns = this.ctn.getElementsByTagName('em')[0].getElementsByTagName('span');
            this.adLength = this.adLis.length;
            for(var i=0,l=this.btns.length;i<l;i++){
                with({i:i}){
                    this.btns[i].index = i;
                    this.btns[i].onclick = this.fnSwitch.bind(this,i);
                    this.btns[i].onclick = this.fnSwitch.bind(this,i);
                }
            }
            this.adLis[this.crtIndex].style.zIndex = 2;
            this.fnPlay();
            this.ctn.onmouseover = this.fnStopPlay.bind(this);
            this.ctn.onmouseout = this.fnPlay.bind(this);
        }
    };
    var player1 = new player('player');
    </script> <!--/*焦点图切换JS结束*/-->
	<script type="text/javascript">
        $(function(){
            //默认状态下左右滚动
            $("#s1").xslider({
                unitdisplayed:6,
                movelength:3,
                unitlen:322,
                autoscroll:5000
            });
        })
    </script>     
</body>
</html>
